package GIT;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;

public class StudentInformation {
    public static List<Student> students = new ArrayList<>();
    private static Scanner scanner = new Scanner(System.in);
    public static void addGrade(){
        System.out.println("\n===记录学生成绩===");
        System.out.println("输入学生姓名");
        String name = scanner.nextLine();
        System.out.println("输入学生学号");
        String xuehao = scanner.nextLine();
        System.out.println("输入课程名称");
        String course = scanner.nextLine();
        System.out.println("请输入成绩(0-100)");
        double grade = scanner.nextDouble();

        if(grade > 100 || grade < 0){
            System.out.println("输入的成绩有误，请重新输入");
        }
        students.add(new Student(name,xuehao,course,grade));
        System.out.println("成绩已记录");
    }
}





